Optimal. Leaf size=87 \[ -\frac {5 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sqrt {3} \sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 \sqrt {3} d}+\frac {5 \log \left (\sqrt {3} \sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 \sqrt {3} d}+\frac {3 x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3919, 3831, 2659, 207} \[ -\frac {5 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sqrt {3} \sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 \sqrt {3} d}+\frac {5 \log \left (\sqrt {3} \sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 \sqrt {3} d}+\frac {3 x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 2659
Rule 3831
Rule 3919
Rubi steps
\begin {align*} \int \frac {3+\sec (c+d x)}{2-\sec (c+d x)} \, dx &=\frac {3 x}{2}+\frac {5}{2} \int \frac {\sec (c+d x)}{2-\sec (c+d x)} \, dx\\ &=\frac {3 x}{2}-\frac {5}{2} \int \frac {1}{1-2 \cos (c+d x)} \, dx\\ &=\frac {3 x}{2}-\frac {5 \operatorname {Subst}\left (\int \frac {1}{-1+3 x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}\\ &=\frac {3 x}{2}-\frac {5 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sqrt {3} \sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 \sqrt {3} d}+\frac {5 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sqrt {3} \sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 \sqrt {3} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 39, normalized size = 0.45 \[ \frac {9 (c+d x)+10 \sqrt {3} \tanh ^{-1}\left (\sqrt {3} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 84, normalized size = 0.97 \[ \frac {18 \, d x + 5 \, \sqrt {3} \log \left (-\frac {2 \, \cos \left (d x + c\right )^{2} + 2 \, {\left (\sqrt {3} \cos \left (d x + c\right ) - 2 \, \sqrt {3}\right )} \sin \left (d x + c\right ) + 4 \, \cos \left (d x + c\right ) - 7}{4 \, \cos \left (d x + c\right )^{2} - 4 \, \cos \left (d x + c\right ) + 1}\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 58, normalized size = 0.67 \[ \frac {9 \, d x - 5 \, \sqrt {3} \log \left (\frac {{\left | -2 \, \sqrt {3} + 6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {3} + 6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) + 9 \, c}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.84, size = 39, normalized size = 0.45 \[ \frac {5 \sqrt {3}\, \arctanh \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {3}\right )}{3 d}+\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.11, size = 80, normalized size = 0.92 \[ -\frac {5 \, \sqrt {3} \log \left (-\frac {\sqrt {3} - \frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}}{\sqrt {3} + \frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}}\right ) - 18 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.30, size = 26, normalized size = 0.30 \[ \frac {3\,x}{2}+\frac {5\,\sqrt {3}\,\mathrm {atanh}\left (\sqrt {3}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \int \frac {\sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} - 2}\, dx - \int \frac {3}{\sec {\left (c + d x \right )} - 2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________